﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinHBM.Core.Net.Sockets
{
    public class CmdMapper
    {
        private static readonly CmdMapper mapper = new CmdMapper();

        public static CmdMapper Instance { get { return mapper; } }

        private Dictionary<string, string> cmdMpas = new Dictionary<string, string>();

        private CmdMapper()
        {

        }

        public void registType(string cmd,string type)
        {
            cmdMpas[cmd] = type;
        }

        public string getType(string cmd)
        {
            if(!cmdMpas.ContainsKey(cmd))
            {
                return null;
            }
            return cmdMpas[cmd];
        }


    }
}
